package com.hl.mapper;

import com.hl.domain.ChatMessageDO;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface ChatMessageMapper {
    int insert(ChatMessageDO msg);

    List<ChatMessageDO> listHistory(@Param("me") String me,
                                    @Param("peer") String peer,
                                    @Param("before") Date before,
                                    @Param("pageSize") int pageSize);

    int markRead(@Param("me") String me,
                 @Param("peer") String peer);
}

